home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-19
/
lspsql2.zip
/
ASITEST.DOC
< prev
next >
Wrap
Text File
|
1992-08-25
|
4KB
|
132 lines
****************************************************************************
asitest.doc
Copyright (C) 1991-1992 by Autodesk, Inc.
Permission to use, copy, modify, and distribute this software
for any purpose and without fee is hereby granted, provided
that the above copyright notice appears in all copies and that
both that copyright notice and this permission notice appear in
all supporting documentation.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
*****************************************************************************
ASITEST.LSP is a test program, which is used for testing the AutoLISP-SQL
interface. Almost every AutoLISP-SQL function is used in this test.
To use ASITEST, do the following:
1. Load LISPSQL.EXP (or LISPSQL under UNIX) with the xload command
(i.e. (xload "lispsql"))
If it succeeds, "LISPSQL" will be echoed to the screen.
2. Load ASITEST.LSP with the load command, (i.e. load "asitest").
To use the ASITEST commands, specify one of the following commands
from the command line.
SQLDRV - Driver Initialisation;
SQLCNC - Open a Handle to a Database;
SQLDIS - Release the Connection to a Database;
SQLFILE - Execute SQL Statements from a file;
SQL - Execute SQL Statements defined in the dialogue box,
and Fetching the results of 'cursor' commands;
TESTBIND - Execute SQL Statements with Host Variables;
SQLTERM - Release the Driver.
SQLDRV
This command is used to initialize the connection between ASITEST
and the Driver. The driver name will be specified as an answer to
an inquiry by the program.
Enter SQL driver name:
If the function succeeded, the message "Driver loaded" will be echoed
to the screen.
SQLCNC
This command is used to connect to the database. The database name,
user name and password are all entered as responses to questions by
the program.
Database name ->
User name ->
Password ->
If the command succeeds, the message "O'k" will be echoed to the screen.
SQLDIS
This command is used to release the connection to the current database.
SQLFILE
This command is used to execute SQL statements from a file.
The file name will be specified when prompted by the program.
For Example:
Enter file name:
The following conventions must be adhered to when creating the SQL
command file.
1. A string with the symbol '$' in the first column is considered
to be a comment.
2. To continue an SQL statement to the next line, the last symbol on the
previous line must be the '&' character.
SQL
This command is used to execute SQL statements that are entered on the
command line. And for fetching the results of cursor commands.
SQL STATEMENT.
drvname\basename\username>
If a 'cursor' command is detected, the following fetch commands are
available.
First - Fetch the First Row.
Last - Fetch the Last Row.
Next - Fetch in a Forward Direction.
Previous - Fetch in a Backward Direction.
Delete - Delete Current Row.
Update - Update Current row.
Show - Print all Row Set.
Exit - Exit from Fetching.
TESTBIND
This command is used to compile an SQL statement with a host variable.
It will define the value, type and length of every host variable, and
execute the compiled SQL statement.
For example:
SQL STATEMENT>
One can indicate the host variables by using ':'.
Host variable name:
Variable type Char/Int/Real/Short/Long/Float:
Enter host variable value:
If a cursor command is detected then the fetch commands are available.
SQLTERM
This command is used to release the current driver.